import request from '@/utils/request'

// 班主任考评任务列表
export function listEvItem(query) {
  return request({
    url: '/teacher/evaluation/task/list',
    method: 'get',
    params: query
  })
}

//新增任务
export function createEvItem(data) {
  return request({
    url: '/teacher/evaluation/task/create',
    method: 'post',
    data: data
  })
}

//查询任务详情
export function infoByTask(ids) {
  return request({
    url: '/teacher/evaluation/task/info/' + ids,
    method: 'get',
  })
}

// 删除任务
export function del(ids) {
  return request({
    url: '/teacher/evaluation/task/deleteByIds/' + ids,
    method: 'delete'
  })
}

//修改
export function update(id, data) {
  return request({
    url: '/teacher/evaluation/task/update/' + id,
    method: 'put',
    data: data
  })
}

//受评人条件查询
export function userEvItem(query) {
  console.log("userEvItem", query);
  return request({
    url: '/teacher/evaluation/task/list/user',
    method: 'get',
    params: query
  })
}

export function userList(query) {
  console.log("userEvItem", query);
  return request({
    url: '/teacher/evaluation/task/list/userList',
    method: 'get',
    params: query
  })
}

//学年条件查询
export function academicYearEvItem() {
  return request({
    url: '/teacher/evaluation/task/list/academicYear',
    method: 'get',
  })
}

//学年对应的学期条件查询
export function academicTermtimeEvItem(id) {
  console.log("academicTermtimeEvItem", id);
  return request({
    url: '/teacher/evaluation/task/list/listTermtime/' + id,
    method: 'get',
  })
}

//学年对应的学期条件查询
export function academicMonthEvItem(id) {
  console.log("academicMonthEvItem", id);
  return request({
    url: '/teacher/evaluation/task/list/listMonth/' + id,
    method: 'get',
  })
}
